﻿Public Class FormPesquisa
    Public Property ObjCol As ListBox.ObjectCollection
    Public Property SelObj As Object
    Private Sub FormPesquisa_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown

        SelObj = Nothing
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If ListBox1.SelectedItem IsNot Nothing Then
            SelObj = ListBox1.SelectedItem
        End If
        Close()

    End Sub

    Private Sub FormPesquisa_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ObjCol = New ListBox.ObjectCollection(ListBox1)
    End Sub

    Private Sub ListBox1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles ListBox1.MouseDoubleClick
        Button1.PerformClick()

    End Sub
End Class